﻿<Window x:Class="PizzaService.View.ShowOrder"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:conv="clr-namespace:PizzaService.Converters"
        Title="Bestellung" Height="600" Width="1100" Background="#FFA41B1B" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles\Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <conv:ZutatenConverter x:Key="ZutatenConverter" />
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"/>
            <RowDefinition Height="AUTO"/>
            <RowDefinition Height="AUTO"/>
        </Grid.RowDefinitions>
        <ListView Grid.Row="0" Name="order" ItemsSource="{Binding Speisen}" Opacity="1" FontSize="14" ItemContainerStyle="{StaticResource CustomItemContainerStlye}">
            <ListView.Background>
                <RadialGradientBrush>
                    <GradientStop Color="#FFCF5454"/>
                    <GradientStop Color="#FFA41B1B" Offset="1"/>
                </RadialGradientBrush>
            </ListView.Background>
            <ListView.View>
                <GridView ColumnHeaderContainerStyle="{StaticResource CustomHeaderStyle}">
                    <GridViewColumn Width="80" Header="Nummer" DisplayMemberBinding="{Binding ID}"/>
                    <GridViewColumn Width="140" Header="Name" DisplayMemberBinding="{Binding Name}"/>
                    <GridViewColumn Width="80" Header="Typ" DisplayMemberBinding="{Binding Typ}"/>
                    <GridViewColumn Width="80" Header="Typ" DisplayMemberBinding="{Binding Size}"/>
                    <GridViewColumn Width="280" Header="Zutaten" DisplayMemberBinding="{Binding Zutaten, Converter={StaticResource ZutatenConverter}}"/>
                    <GridViewColumn Width="280" Header="Extra-Zutaten" DisplayMemberBinding="{Binding ExtraZutaten, Converter={StaticResource ZutatenConverter}}"/>
                    <GridViewColumn Width="140" Header="Preis" DisplayMemberBinding="{Binding GesamtPreis, StringFormat=C}"/>
                </GridView>
            </ListView.View>
        </ListView>
        <TextBlock Grid.Row="1" Text="Summe:" Margin="0,5,0,5" Style="{StaticResource CustomTextBlockStyle}"/>
        <TextBlock Grid.Row="1" Margin="0,5,-120,5" Text="{Binding Summe, StringFormat=C}"  Style="{StaticResource CustomTextBlockStyle}"/>
        <TextBlock Grid.Row="1" Margin="0,5,800,5" Text="Lieferpauschale:"  Style="{StaticResource CustomTextBlockStyle}"/>
        <TextBlock Grid.Row="1" Margin="0,5,600,5" Text="{Binding Lieferpauschale, StringFormat=C}" TextAlignment="Right" Style="{StaticResource CustomTextBlockStyle}"/>
        <ComboBox Name="ComboState" Grid.Row="1" Width="110" Height="25" HorizontalAlignment="Right" Margin="5">
            <ComboBoxItem Name="WirdBearbeitet">Wird Bearbeitet</ComboBoxItem>
            <ComboBoxItem Name="Ausgeliefert">Ausgeliefiert</ComboBoxItem>
            <ComboBoxItem Name="Abgebrochen">Abgebrochen</ComboBoxItem>
        </ComboBox>
        <Button Name="BtnCancelShowOrder" Grid.Row="2" HorizontalAlignment="Right" Click="BtnCloseShowOrder_Click_1" Margin="0,5,250,5" Content="Cancel" Style="{StaticResource CustomButtonStyle}"/>
        <Button Name="BtnCloseShowOrder" Grid.Row="2" HorizontalAlignment="Right" Click="BtnCloseShowOrder_Click_2" Margin="0,5,30,5" Content="OK" Style="{StaticResource CustomButtonStyle}"/>
    </Grid>
</Window>
